<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>动态列表 - 社交圈</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #3B82F6;
      --primary-light: #EFF6FF;
      --secondary: #6366F1;
      --text-primary: #1F2937;
      --text-secondary: #6B7280;
      --bg-light: #F9FAFB;
      --bg-white: #FFFFFF;
      --border-light: #E5E7EB;
      --red: #EF4444;
      --green: #10B981;
      --yellow: #F59E0B;
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: var(--bg-light);
      color: var(--text-primary);
      line-height: 1.6;
      padding-top: 56px;
      padding-bottom: 70px;
      font-size: 15px;
    }
    
    /* 顶部导航 */
    .navbar {
      background-color: var(--bg-white);
      box-shadow: 0 2px 4px rgba(0,0,0,0.05);
      padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
      color: var(--text-primary);
      font-weight: 600;
      font-size: 18px;
    }
    
    .nav-link {
      color: var(--text-primary);
      padding: 0.5rem;
    }
    
    /* 动态列表容器 */
    .feed-container {
      padding: 10px 0;
    }
    
    /* 动态项 */
    .feed-item {
      background-color: var(--bg-white);
      margin-bottom: 10px;
      padding: 15px;
    }
    
    /* 动态头部 */
    .feed-header {
      display: flex;
      margin-bottom: 12px;
    }
    
    .user-avatar {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 10px;
    }
    
    .user-info {
      flex: 1;
    }
    
    .user-name {
      font-weight: 600;
      font-size: 15px;
      margin-bottom: 2px;
    }
    
    .post-time {
      font-size: 12px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
    }
    
    .post-source {
      font-size: 12px;
      color: var(--primary);
      background-color: var(--primary-light);
      padding: 0 5px;
      border-radius: 3px;
      margin-left: 5px;
    }
    
    .menu-btn {
      color: var(--text-secondary);
      font-size: 16px;
    }
    
    /* 转发信息 */
    .repost-info {
      background-color: var(--bg-light);
      padding: 10px 12px;
      border-radius: 8px;
      margin-bottom: 12px;
      font-size: 14px;
    }
    
    .repost-by {
      color: var(--text-secondary);
      margin-bottom: 5px;
    }
    
    .repost-by a {
      color: var(--primary);
      text-decoration: none;
    }
    
    /* 动态内容 */
    .post-content {
      margin-bottom: 12px;
      line-height: 1.5;
    }
    
    /* 图片容器 */
    .post-images {
      margin-bottom: 12px;
      border-radius: 8px;
      overflow: hidden;
    }
    
    /* 单张图片 */
    .single-image {
      width: 100%;
      aspect-ratio: 16/9;
      object-fit: cover;
    }
    
    /* 多张图片 - 网格布局 */
    .image-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 3px;
    }
    
    .image-grid-3 {
      grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-image {
      aspect-ratio: 1;
      object-fit: cover;
    }
    
    /* 内容卡片 - 用于转发的文章、服务等 */
    .content-card {
      border: 1px solid var(--border-light);
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 12px;
      display: flex;
      text-decoration: none;
      color: var(--text-primary);
    }
    
    .card-image {
      width: 100px;
      flex-shrink: 0;
      object-fit: cover;
    }
    
    .card-content {
      padding: 10px;
      flex: 1;
      display: flex;
      flex-direction: column;
    }
    
    .card-title {
      font-weight: 500;
      margin-bottom: 5px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      font-size: 14px;
    }
    
    .card-meta {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: auto;
    }
    
    .card-type {
      display: inline-block;
      font-size: 11px;
      color: var(--primary);
      background-color: var(--primary-light);
      padding: 0 4px;
      border-radius: 2px;
      margin-right: 5px;
    }
    
    /* 动态底部操作区 */
    .post-actions {
      display: flex;
      justify-content: space-around;
      padding-top: 8px;
      border-top: 1px solid var(--border-light);
    }
    
    .action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      color: var(--text-secondary);
      font-size: 14px;
      padding: 5px 0;
      flex: 1;
      transition: all 0.2s;
    }
    
    .action-btn:hover {
      color: var(--primary);
    }
    
    .action-btn.active {
      color: var(--red);
    }
    
    /* 底部发布按钮 */
    .post-button {
      position: fixed;
      bottom: 20px;
      right: 20px;
      width: 55px;
      height: 55px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
      border: none;
      z-index: 10;
    }
    
    /* 骨架屏加载效果 */
    .skeleton {
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: skeleton-loading 1.5s infinite;
    }
    
    @keyframes skeleton-loading {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
  </style>
</head>
<body>
  <!-- 顶部导航 -->
  <nav class="navbar navbar-light fixed-top">
    <div class="container-fluid">
      <a class="nav-link" href="#" aria-label="首页">
        <i class="fa fa-home"></i>
      </a>
      <span class="navbar-brand mb-0">动态</span>
      <a class="nav-link" href="#" aria-label="通知">
        <i class="fa fa-bell-o"></i>
      </a>
    </div>
  </nav>
  
  <!-- 动态列表容器 -->
  <div class="feed-container">
    <!-- 1. 无图动态 -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=1" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">张小明</div>
          <div class="post-time">
            2小时前
            <span class="post-source">原创</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="post-content">
        今天发布了我们团队的新产品，经过半年的努力终于和大家见面了！感谢团队所有人的付出，也感谢用户一直以来的支持。希望这个产品能给大家带来更好的体验，欢迎大家试用并提出宝贵意见！
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>32</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>15</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>89</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 2. 转发文章（单图） -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=2" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">李华</div>
          <div class="post-time">
            昨天 18:30
            <span class="post-source">转发文章</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="repost-info">
        <div class="repost-by">
          <a href="#">@科技日报</a> 发布了一篇文章
        </div>
        <div class="content-card">
          <img src="https://picsum.photos/400/300?random=10" alt="文章封面" class="card-image">
          <div class="card-content">
            <div class="card-title">2023年社交网络发展趋势报告：隐私保护成用户最关注因素</div>
            <div class="card-meta">
              <span class="card-type">文章</span>
              阅读 2.5k · 评论 128
            </div>
          </div>
        </div>
      </div>
      
      <div class="post-content">
        这篇报告分析得很到位，隐私保护确实是现在社交产品的重中之重，我们团队也在这方面做了很多努力。推荐大家阅读！
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>18</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>7</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-heart-o"></i>
          <span>42</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 3. 多图动态（3张） -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=3" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">王摄影</div>
          <div class="post-time">
            3天前
            <span class="post-source">原创</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="post-content">
        周末去郊外拍的一组照片，天气正好，光线也特别棒，分享给大家~
      </div>
      
      <div class="post-images">
        <div class="image-grid image-grid-3">
          <img src="https://picsum.photos/300/300?random=20" alt="照片1" class="grid-image">
          <img src="https://picsum.photos/300/300?random=21" alt="照片2" class="grid-image">
          <img src="https://picsum.photos/300/300?random=22" alt="照片3" class="grid-image">
        </div>
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>56</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>23</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>156</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 4. 转发相册（4张） -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=4" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">设计工作室</div>
          <div class="post-time">
            4天前
            <span class="post-source">转发相册</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="repost-info">
        <div class="repost-by">
          <a href="#">@创意设计</a> 发布了新相册
        </div>
        <div class="post-images">
          <div class="image-grid">
            <img src="https://picsum.photos/300/300?random=30" alt="相册图片1" class="grid-image">
            <img src="https://picsum.photos/300/300?random=31" alt="相册图片2" class="grid-image">
            <img src="https://picsum.photos/300/300?random=32" alt="相册图片3" class="grid-image">
            <img src="https://picsum.photos/300/300?random=33" alt="相册图片4" class="grid-image">
          </div>
        </div>
      </div>
      
      <div class="post-content">
        这组设计作品太赞了，尤其是色彩搭配和排版，值得我们学习！已经收藏起来作为参考了~
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>27</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>14</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>93</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 5. 转发服务 -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=5" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">创业小助手</div>
          <div class="post-time">
            1周前
            <span class="post-source">转发服务</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="repost-info">
        <div class="repost-by">
          <a href="#">@云服务平台</a> 提供了新服务
        </div>
        <div class="content-card">
          <img src="https://picsum.photos/400/300?random=40" alt="服务图片" class="card-image">
          <div class="card-content">
            <div class="card-title">初创企业云服务解决方案 - 提供一站式云计算、存储和安全服务</div>
            <div class="card-meta">
              <span class="card-type">服务</span>
              价格: ¥999/月起 · 评分 4.8
            </div>
          </div>
        </div>
      </div>
      
      <div class="post-content">
        刚创业的朋友可以看看这个服务，我们公司一直在用，性价比很高，技术支持也很到位，推荐给大家！
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>42</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>31</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>127</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 6. 转发招聘 -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=6" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">HR招聘官</div>
          <div class="post-time">
            1周前
            <span class="post-source">转发招聘</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="repost-info">
        <div class="repost-by">
          <a href="#">@科技公司</a> 发布了招聘信息
        </div>
        <div class="content-card">
          <img src="https://picsum.photos/400/300?random=50" alt="公司图片" class="card-image">
          <div class="card-content">
            <div class="card-title">资深UI/UX设计师 - 15k-25k/月，福利完善，团队年轻有活力</div>
            <div class="card-meta">
              <span class="card-type">招聘</span>
              地点: 北京 · 经验: 3-5年
            </div>
          </div>
        </div>
      </div>
      
      <div class="post-content">
        我们公司正在快速发展，急需优秀的设计师加入，团队氛围超好，欢迎有兴趣的朋友投递简历！
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>67</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>45</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>89</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
    
    <!-- 7. 转发求职 -->
    <div class="feed-item">
      <div class="feed-header">
        <img src="https://picsum.photos/200/200?random=7" alt="用户头像" class="user-avatar">
        <div class="user-info">
          <div class="user-name">职业推荐官</div>
          <div class="post-time">
            2周前
            <span class="post-source">转发求职</span>
          </div>
        </div>
        <a href="#" class="menu-btn">
          <i class="fa fa-ellipsis-h"></i>
        </a>
      </div>
      
      <div class="repost-info">
        <div class="repost-by">
          <a href="#">@前端开发者</a> 发布了求职信息
        </div>
        <div class="content-card">
          <img src="https://picsum.photos/400/300?random=60" alt="个人照片" class="card-image">
          <div class="card-content">
            <div class="card-title">前端开发工程师，5年经验，精通Vue/React，寻求北京/上海的工作机会</div>
            <div class="card-meta">
              <span class="card-type">求职</span>
              期望薪资: 25k-35k/月 · 已离职
            </div>
          </div>
        </div>
      </div>
      
      <div class="post-content">
        这位开发者技术很扎实，之前有过多个大型项目经验，有需要前端人才的公司可以联系他聊聊~
      </div>
      
      <div class="post-actions">
        <button class="action-btn">
          <i class="fa fa-comment-o"></i>
          <span>38</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-retweet"></i>
          <span>29</span>
        </button>
        <button class="action-btn active">
          <i class="fa fa-heart"></i>
          <span>76</span>
        </button>
        <button class="action-btn">
          <i class="fa fa-share-alt"></i>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 发布按钮 -->
  <button class="post-button" aria-label="发布动态">
    <i class="fa fa-plus"></i>
  </button>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 动态操作按钮交互
    document.querySelectorAll('.action-btn').forEach(btn => {
      btn.addEventListener('click', function() {
        // 点赞按钮切换状态
        if (this.querySelector('.fa-heart') || this.querySelector('.fa-heart-o')) {
          this.classList.toggle('active');
          const icon = this.querySelector('i');
          if (this.classList.contains('active')) {
            icon.className = 'fa fa-heart';
          } else {
            icon.className = 'fa fa-heart-o';
          }
          
          // 更新数字
          const countEl = this.querySelector('span');
          if (countEl) {
            let count = parseInt(countEl.textContent);
            count = this.classList.contains('active') ? count + 1 : count - 1;
            countEl.textContent = count;
          }
        }
      });
    });
    
    // 菜单按钮点击事件
    document.querySelectorAll('.menu-btn').forEach(btn => {
      btn.addEventListener('click', function(e) {
        e.preventDefault();
        
        const rect = this.getBoundingClientRect();
        const menu = document.createElement('div');
        menu.className = 'position-fixed bg-white shadow-lg rounded-lg p-2 z-50 w-40';
        menu.style.top = `${rect.bottom + window.scrollY + 5}px`;
        menu.style.right = `${window.innerWidth - rect.right + 5}px`;
        menu.innerHTML = `
          <div class="py-2 px-3 cursor-pointer hover:bg-gray-100 rounded">
            <i class="fa fa-flag-o mr-2"></i>举报
          </div>
          <div class="py-2 px-3 cursor-pointer hover:bg-gray-100 rounded">
            <i class="fa fa-ban mr-2"></i>屏蔽
          </div>
        `;
        document.body.appendChild(menu);
        
        // 点击其他区域关闭菜单
        const closeMenu = function(e) {
          if (!menu.contains(e.target) && e.target !== btn) {
            menu.remove();
            document.removeEventListener('click', closeMenu);
          }
        };
        
        document.addEventListener('click', closeMenu);
      });
    });
    
    // 发布按钮点击事件
    document.querySelector('.post-button').addEventListener('click', function() {
      const modal = document.createElement('div');
      modal.className = 'fixed inset-0 bg-black bg-opacity-50 z-50 flex items-end justify-center';
      modal.innerHTML = `
        <div class="bg-white w-full rounded-t-xl p-5 max-height-[80vh]">
          <div class="text-center mb-6">
            <h3 class="text-lg font-semibold">发布内容</h3>
          </div>
          <div class="grid grid-cols-4 gap-4 text-center">
            <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-100 cursor-pointer">
              <div class="w-12 h-12 rounded-full bg-primary-light flex items-center justify-center mb-2">
                <i class="fa fa-pencil text-primary"></i>
              </div>
              <span class="text-sm">发动态</span>
            </div>
            <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-100 cursor-pointer">
              <div class="w-12 h-12 rounded-full bg-primary-light flex items-center justify-center mb-2">
                <i class="fa fa-image text-primary"></i>
              </div>
              <span class="text-sm">发相册</span>
            </div>
            <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-100 cursor-pointer">
              <div class="w-12 h-12 rounded-full bg-primary-light flex items-center justify-center mb-2">
                <i class="fa fa-file-text-o text-primary"></i>
              </div>
              <span class="text-sm">写文章</span>
            </div>
            <div class="flex flex-col items-center p-3 rounded-lg hover:bg-gray-100 cursor-pointer">
              <div class="w-12 h-12 rounded-full bg-primary-light flex items-center justify-center mb-2">
                <i class="fa fa-briefcase text-primary"></i>
              </div>
              <span class="text-sm">发服务</span>
            </div>
          </div>
          <div class="mt-6">
            <button class="w-full py-3 bg-gray-100 rounded-lg text-gray-700 font-medium" id="cancelPost">取消</button>
          </div>
        </div>
      `;
      document.body.appendChild(modal);
      document.body.style.overflow = 'hidden';
      
      // 取消按钮事件
      modal.querySelector('#cancelPost').addEventListener('click', function() {
        modal.remove();
        document.body.style.overflow = '';
      });
      
      // 点击外部关闭
      modal.addEventListener('click', function(e) {
        if (e.target === modal) {
          modal.remove();
          document.body.style.overflow = '';
        }
      });
    });
    
    // 无限滚动模拟
    let page = 1;
    window.addEventListener('scroll', function() {
      if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight - 500) {
        loadMore();
      }
    });
    
    // 加载更多函数
    function loadMore() {
      if (page > 2) return; // 仅加载2页更多内容
      
      page++;
      const container = document.querySelector('.feed-container');
      
      // 创建加载指示器
      const loader = document.createElement('div');
      loader.className = 'text-center py-4';
      loader.innerHTML = '<i class="fa fa-spinner fa-spin text-primary"></i> 加载更多内容...';
      container.appendChild(loader);
      
      // 模拟加载延迟
      setTimeout(() => {
        loader.remove();
        
        // 复制第一个动态作为示例
        const firstItem = document.querySelector('.feed-item').cloneNode(true);
        container.appendChild(firstItem);
      }, 1500);
    }
  </script>
</body>
</html>
